<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<title>结算报表</title>
	<link rel="stylesheet" href="__PUBLIC__/css/payment.css">
    <link rel="stylesheet" href="__PUBLIC__/css/public.css">

	<style type="text/css" media="screen">
		table {
            height: 80%;
            width: 80%;         /*  必须设置一个宽度， margin: 0 auto才能使之居于父组件中央*/
            margin: 10px auto;  /*  通过设置外边距（margin）中的左右外边距属性为auto使之居于父组件（body）中间*/
       		color: red;
       		border:1px solid red;
       	 }
     
            th{
            	border-bottom: 1px solid #F00;
            	border-right: 1px solid #F00;
            }
            td{
            	border-right: 1px solid #F00;
            	border-bottom: 1px solid #F00;
            	text-align: center;
            }
            table>tr>td{
                height: 100%; width: 33.3%;
               
            }

            #payment{
            	 height: 100px;
            	 width: 100px;  

            	 margin: 10px auto;
            	  margin-top:20px;
            }
	</style>

	<script type="text/javascript">

		function paymentweek(week,count,payfee){
			
			if(window.confirm('你确定要结算吗？')){
                $.ajax({
                cache: true,
                type: "POST",
                url:"{:U('report/paymentEnter')}",
                data:{'week':week,'count':count,'payfee':payfee},// 你的formid
                async: false,
                error: function(request) {
                    alert("Connection error");
                },
                success: function(data) {
                   
                  alert(data['info']);
                  
                }
            });
                 return true;
              }else{
                
                 return false;
             }
			
		}

	</script>
</head>
<body>
	<table class="table table-bordered table-hover definewidth m10">
		<caption>结算报表({$week}周)</caption>
		<thead>
			<tr>
				<th>日期</th><th>指令</th><th>成功数</th><th style="border-right: 0px">结算单价</th>
			</tr>
		</thead>
		<tbody>

			<foreach name="list" item="vo">
			   <tr>
				<td>{$vo.create_time}</td><td>{$vo.servcode}</td><td>{$vo.count}</td><td style="border-right: 0px">{$vo.price}</td>
				</tr>
			 </foreach>


		</tbody>
		<tr>
			
		<td colspan="2" style="border-bottom: 0px">共:{$total.total_count}条</td>
		<td style="border-bottom: 0px">结算金额:{$total.total_price}元</td>
		</tr>
			</table>

			<div id="payment">
				<a href="javascript:paymentweek({$week},{$total.total_count},{$total.total_price})">现在结算</a>

			</div>
</body>
</html>